

import React from 'react';
import { Table } from 'antd';
 
const data = [];
for (let i = 0; i < 100; i++) {
  data.push({
    key: i.toString(),
    name: `Edward King ${i}`,
    age: 32,
    address: `London, Park Lane no. ${i}`,
  });
}
 
const pageOne = () => {
  const renderIndex = (value, index) => index + 1;
 
  return (
    <Table
      dataSource={data}
      rowKey="key"
      columns={[
        {
          title: '序号',
          key: 'index',
          render: (text, record, index) => renderIndex(text, index),
        },
        {
          title: 'Name',
          dataIndex: 'name',
          key: 'name',
        },
        {
          title: 'Age',
          dataIndex: 'age',
          key: 'age',
        },
        {
          title: 'Address',
          dataIndex: 'address',
          key: 'address',
        },
      ]}
    />
  );
};
 
export default pageOne;